<?php
/**
 * Created by IntelliJ IDEA.
 * User: dhy
 * Date: 2015/9/11
 * Time: 15:54
 */

namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;
class AdAuthMiddleware {

    public function handle($request,  $next){

        $adUser = Session::get('adminUser');
        if ($adUser == null) {
            return redirect('admin/login');
        }
        return $next($request);
    }
}